//假设int型变量value已经被初始化为一个正整数。编写一个while循环，输出其所有正因子的值。例如value的值是28,它将输出以下信息：1 2 4 7 14 28
import java.util.Scanner;
public class SR5_22
{
  public static void main(String []args)
  {
   int value;
   int factor = 1;
     
   Scanner scan = new Scanner(System.in);
   System.out.println("Please input a value:");
   value = scan.nextInt();

   while (factor <= value)
   {
     if((value % factor) == 0)
       System.out.println("factor have:"+factor);
       factor++;
   } 
   }
}   

